package rest.home.dao;

import rest.home.entity.*;
import rest.home.entity.ms.OlderAndVisitorAndRoom;

import java.sql.SQLException;
import java.util.List;

/**
 * @author: lbc
 * @Date: 2022/5/5 15:29
 * @version: 8.0
 * @describe:
 */
public interface RestHomeD {
    //登录
    public List<Admin> login() throws SQLException;
    //新增账号密码
    public Integer addAdmin(Admin admin) throws SQLException;
    /*//根据账号判断是否存在
    public Integer findAdminIdJudgeExists(String adminId);*/
    //2.1、查询老人信息
    public List<Older> findAll() throws SQLException;
    //2.2、修改老人信息
    public Integer updateOlder(Older older) throws SQLException;
    public List<Room> ShowRoom()throws SQLException;
    //根据老人ID查询老人信息
    public Older findOlderIdByOlder(Integer olderId) throws SQLException;
    public List<Trouble> findAllTrouble() throws SQLException;//展示事故信息
    public Trouble findTroubleById(Integer troubleId) throws SQLException;//根据id查看事故信息
    public Integer updateTroubleById(Trouble trouble)throws SQLException;//修改事故信息
    public Integer addTrouble(Trouble trouble) throws SQLException;//新增事故信息
    public Integer deleteTrouble(Integer troubleId) throws SQLException;//删除事故信息
    public List<Room> showRoom()throws SQLException;
    public List<Room> showRoomByStatus()throws SQLException;
    public List<Room> showRoomByType(String typeName)throws SQLException;
    public Integer addRoomMessage(Room room)throws SQLException;
    public Integer updateRoomMessage(Room room)throws SQLException;
    public Integer deleteRoomMessage(Integer id)throws SQLException;
    /*public List<Trouble> findAllTrouble() throws SQLException;*/
    public List<PayMent> findAllPayMent() throws SQLException;
    public List<Nurse> findAllNurse() throws SQLException;
    public Nurse existsNurseId(Integer integer) throws SQLException;
    public Integer updateNurse(Nurse nurse) throws SQLException;
    public Integer addNurse(Nurse nurse) throws SQLException;
    public Integer deleteNurse(Integer integer) throws SQLException;
    //添加老人
    public Integer addOlder(Older older) throws SQLException;
    //删除老人
    public Integer deleteOlder(Integer deleteOlderId) throws SQLException;
    public List<Health> showHealthByType() throws SQLException;
    public Integer updateHealthMessage(Health health)throws SQLException;
    public List<Medicine> showMedicine()throws SQLException;
    public Integer addMedicine(Medicine medicine) throws SQLException;
    public Integer updateMedicine(Medicine medicine) throws SQLException;
    public Integer deleteMedicine(Integer integer) throws SQLException;
    public Integer addHealth(Health health) throws SQLException;
    public List<NursingPayMent> showAllNursing() throws SQLException;
    public List<PayMent> findPayMentByOlderId(Integer integer) throws SQLException;
    public List<Visitor> showAllVisitor() throws SQLException;//展示访客信息
    public Visitor findVisitorById(Integer vistorId) throws SQLException;//根据ID查看访客信息
    public Integer updateVisitore(Visitor visitor) throws SQLException;//修改访客信息
    public Integer addVisitor(Visitor visitor) throws SQLException ;//新增访客信息
    public Integer deleteVisitor(Integer visitorId) throws SQLException;//删除访客信息
    public List<PayMent> findOlderByStatus(Integer olderId) throws SQLException; //查询缴费状态
    //查看外出信息
    public List<Outing> showAllOuting() throws SQLException;
    //外出报备
    public Integer addOuting(Outing outing) throws SQLException;
    //判断外出报备ID是否存在
    public Outing existsOutingId(Integer outingId) throws SQLException;
    //外出归来修改报备状态
    public Integer updateOuting(Outing outing) throws SQLException;
    public List<OlderAndVisitorAndRoom> OlderAndVisitorAndRoomByPage(Integer index) throws SQLException;//分页展示访客信息及老人信息及房间号
    public Integer findOlderNum() throws SQLException ;
}
